Repository navigation
fix: make the arguments filter work on mysql and sqlite - #56
Merged
vishaltps merged 5 commits intoNov 28, 2026
Merged
Conversation
phmunhoz
force-pushed
the
fix/arguments-filter-cross-adapter
branch
from
November 24, 2026 01:37
deb79ff to
2ccfa40
Compare
phmunhoz
marked this pull request as draft
November 24, 2026 01:51
phmunhoz
marked this pull request as ready for review
November 24, 2026 02:23
vishaltps
previously approved these changes
Nov 24, 2026
vishaltps
approved these changes
Nov 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The arguments filter answers 500 on MySQL and SQLite on every page that offers it (Failed, Ready, Scheduled, In Progress and Recurring Jobs, and the queue details page):
It was built as
arguments::text ILIKE ?, which only PostgreSQL accepts. The suite runs on SQLite only and never exercised the filter, so it went unnoticed. We hit it in production on MySQL.Changes
matches, which rendersILIKEon PostgreSQL andLIKEon the others, so the search still ignores case on all three.%and_in the search term are escaped and match literally. The pattern goes in as a quoted node rather than a String. Solid Queue serializesarguments(JSON onJob, ActiveJob arguments onRecurringTask), and Arel casts a plain String through that coder, which would wrap the pattern in JSON quotes so that nothing matches. The spec stubs now serializeargumentsthe way the real models do, so the suite catches this.UNIX_TIMESTAMP, which reads aDATETIMEin the session time zone, while Rails stores UTC. On any non-UTC server every bucket moved by the server's offset, and jobs near the edge of the window fell out of the chart. It now usesTIMESTAMPDIFF(SECOND, '1970-01-01 00:00:00', col), which doesn't depend on the time zone.spec_helper.rbreadsDATABASE_URL, and in-memory SQLite stays the default. Themysql2andpggems are in optional Bundler groups, so a plainbundle installneeds neither client library. CI gets two new jobs that run the full suite on MySQL 8 (with the server set toAmerica/Sao_Paulo, so time zone bugs show up) and on PostgreSQL 16. The README's Development section explains how to run the suite on MySQL or PostgreSQL locally.Testing
spec/requests/solid_queue_monitor/arguments_filter_spec.rbcovers every page with the filter, for case-insensitive matching and for a literal%.